package com.lzq.TEST;

import com.lzq.ArrayList.ArrayList;
import com.lzq.HashMap.HashMap;
import com.lzq.LinkedList.LinkedList;
import org.junit.Test;

public class TEST {
    @Test
    public void testArrayList(){
        ArrayList arrayList = new ArrayList();
        arrayList.add(1);
        arrayList.add(2);
        System.out.println("======" + arrayList.size());
        System.out.println("======" + arrayList.isEmpty());
        System.out.println("======" + arrayList.remove(1));
        System.out.println("======" + arrayList.get(1));
    }
    @Test
    public void testLinkedList(){
        LinkedList linkedList = new LinkedList();
        linkedList.add(1);
        System.out.println("======" + linkedList.size());
        System.out.println("======" + linkedList.isEmpty());
        System.out.println("======" + linkedList.get(0));
        System.out.println("======" + linkedList.remove(0));
        System.out.println("======" + linkedList.get(0));
    }
    @Test
    public void testHashMap(){
        HashMap hashMap = new HashMap();
        hashMap.put("1","lu");
        System.out.println("=======" + hashMap.get("1"));
        hashMap.put("2","ze");
        System.out.println("=======" + hashMap.get("2"));
        hashMap.put("3","quan");
        System.out.println("=======" + hashMap.get("3"));
        hashMap.put("1","lzq");
        System.out.println("=======" + hashMap.get("1"));
        hashMap.remove("1");
        System.out.println("=======" + hashMap.get("1"));
    }
}
